package cn.iocoder.yudao.module.engine.service.core.filter;

import cn.iocoder.yudao.module.engine.service.core.filter.read.*;
import cn.iocoder.yudao.module.engine.service.core.filter.read.ThreeAxisSensorRange2AudioFilter;
import cn.iocoder.yudao.module.engine.service.core.pipeline.FilterManager;
import jakarta.annotation.PostConstruct;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Component;

@Component
public class FilterConfiguration {
    @Resource
    private AttachAuxiliaryDataFilter attachAuxiliaryDataFilter;
    @Resource
    private AIChatFilter aiChatFilter;
    @Resource
    private Keyword2SensorInstructionFilter keyword2SensorInstructionFilter;
    @Resource
    private ThreeAxisSensorRange2AudioFilter threeAxisSensorRange2AudioFilter;

    @PostConstruct
    public void init() {
        FilterManager.getInstance().initPipeline(attachAuxiliaryDataFilter);

        // read
        FilterManager.getInstance().getPipeline().addLast("根据传感器数据回复音频", threeAxisSensorRange2AudioFilter);
        FilterManager.getInstance().getPipeline().addLast("根据语音文本中的关键字执行传感器指令", keyword2SensorInstructionFilter);
        FilterManager.getInstance().getPipeline().addLast("AI聊天", aiChatFilter);
    }

}
